package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Set;

@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="quoted_price_detail", schema="erp")
public class QuotedPriceDetail extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 报价单id
     */
    @Column(name = "quoted_price_id")
    private String quotedPriceId;

    /**
     * 询价单id
     */
    @Column(name = "inquiry_list_id")
    private String inquiryListId;
    /**
     * 物资id
     */
    @Column(name = "material_id")
    private String materialId;
    /**
     * 供应商id
     */
    @Column(name = "supplier_id")
    private String supplierId;
    /**
     * 小计
     */
    @Column(name = "totla")
    private BigDecimal total;

    /**
     * 物资单价
     */
    @Column(name = "price")
    private BigDecimal price;
    /**
     * 是否含税
     */
    @Column(name = "is_tax")
    private String isTax;

    /**
     * 税率
     */
    @Column(name = "tax_rate")
    private String taxRate;

    /**
     * 别名
     */
    @Column(name = "another_name")
    private String anotherName;

    /**
     * 供应商描述
     */
    @Column(name = "supplier_remark")
    private String supplierRemark;

    /**
     * 是否完全响应
     */
    @Column(name = "all_respond")
    private String allRespond;

    /**
     * 响应说明
     */
    @Column(name = "respond_remark")
    private String respondRemark;

    /**
     * 提交的id集合
     */
    @Transient
    private Set<String> ids;

}
